﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SectionPlaneWaterlevel.aspx.cs" Inherits="GroundWater.analysis.SectionPlaneWaterlevel" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <ajaxToolkit:ToolkitScriptManager runat="server" ID="sm"  />
    <div class="region" style="width: 96%; font-size:9pt;">
        <table style="width: 100%;">
            <tr>
                <%--<td>剖面:</td><td><asp:DropDownList ID="drpSectionPlane" runat="server" 
                DataSourceID="odsSectionPlane" DataTextField="Name" DataValueField="Code"   
                EnableViewState="false" OnSelectedIndexChanged="drpSectionPlane_SelectedIndexChanged" 
                AutoPostBack="true" ondatabound="drpSectionPlane_DataBound" ></asp:DropDownList></td>--%>
                <td>日期从:</td><td><asp:TextBox runat="server"  id="txtStartDate"   />&nbsp;<img onclick="WdatePicker({el:$dp.$('txtStartDate')})" src="../js/My97DatePicker/skin/datePicker.gif" width="16" height="22" align="absmiddle" /></td>
                <td>到:</td><td><asp:TextBox runat="server"  id="txtEndDate"  />&nbsp;<img onclick="WdatePicker({el:$dp.$('txtEndDate')})" src="../js/My97DatePicker/skin/datePicker.gif" width="16" height="22" align="absmiddle" /></td>
                <td colspan="2"><asp:Button ID="btnAnalysis" runat="server" Text="统计"  onclick="btnAnalysis_Click" /></td>

            </tr>
            <%--<tr>
                <td>平均水位:</td><td><span id="waterLevel" class="warning" style="font-size:12pt;"></span></td>
                <td>平均埋深:</td><td><span id="altitude" class="warning" style="font-size:12pt;"></span></td>
                <td colspan="2"><asp:Button ID="btnAnalysis" runat="server" Text="统计"  onclick="btnAnalysis_Click" /></td>
            </tr>--%>
            
        </table>
    </div>
    
<asp:ObjectDataSource ID="odsSectionPlane" runat="server" SelectMethod="FetchAllWithValley" TypeName="GroundWater.BusinessActions.SectionPlane" >
    <SelectParameters>
        <%--<asp:Parameter Name="isStoredProc" Type="Boolean" DefaultValue="False" />
        <asp:Parameter Name="enableCache" Type="Boolean" DefaultValue="True" />--%>
    </SelectParameters>
</asp:ObjectDataSource>

 <div style="width:100%; margin-top:10px;">
        <p style="font-weight:bold; font-family:Tahoma; margin-bottom:8px; "></p>
        <div class="grid">
            <div class="rounded">
                <div class="top-outer"><div class="top-inner"><div class="top">
                    <h2>剖面平均水位</h2>
                </div></div></div>
                <div class="mid-outer"><div class="mid-inner"><div class="mid">     
                    <!-- Content Goes Here! -->
                    <asp:UpdatePanel ID="updPanel" runat="server" UpdateMode="Conditional">
                        <ContentTemplate>
                            <asp:GridView  ID="gvMonitoring" runat="server"  SkinID="DefaultGridView" OnRowDataBound="RowDataBound" >
                                <Columns>
                                    <asp:BoundField  HeaderText="剖面名称" DataField="Plane"  HeaderStyle-CssClass="first" ItemStyle-CssClass="first" />
                                    <asp:BoundField  HeaderText="水位" DataField="Waterlevel"  DataFormatString="{0:N2}"    />
                                    <asp:BoundField  HeaderText="埋深" DataField="Altitude"  DataFormatString="{0:N2}"    />
                                </Columns>
                            </asp:GridView>   
                        </ContentTemplate>
                        <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="btnAnalysis" />
                        <%--<asp:AsyncPostBackTrigger ControlID="drpSectionPlane" EventName="SelectedIndexChanged" />--%>
                        </Triggers>
                    </asp:UpdatePanel>                     
    
                </div></div></div>
            <div class="bottom-outer"><div class="bottom-inner">
            <div class="bottom"></div></div></div>                   
        </div>      
        </div>
    </div>

    <asp:updateprogress id="updateProgress" runat="server" DynamicLayout="true" DisplayAfter="200">
    <progresstemplate>
        <div id="progressBackgroundFilter"></div>
        <div id="processMessage">正在处理数据，请稍等...<br /><br /><img alt="Loading" src="../images/loading_16.gif" /></div>
    </progresstemplate>
</asp:updateprogress>


<script type="text/javascript">
//<![CDATA[
//    var prm = Sys.WebForms.PageRequestManager.getInstance();
//    prm.add_pageLoading(pageLoadingHandler);
//    function pageLoadingHandler(sender, args) {
//        var dataItems = args.get_dataItems();
//        if (dataItems['btnAnalysis'] && dataItems['btnAnalysis'].length > 0) {
//            var s = dataItems['btnAnalysis'].split('|');
//            $get("waterLevel").innerText = s[0];
//            $get("altitude").innerText = typeof (s[1]) !== "undefined" ? s[1] : "未设置水井的地面高程，无法计算埋深";
//        }
//        else {
//            $get("waterLevel").innerText = "";
//            $get("altitude").innerText = "";
//        }
//    }
//]]>
</script>
    </form>
    <script type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
</body>
</html>
